#!/bin/bash
install_zsh() {
	if [ -f /usr/bin/yum ];then
		echo "当前操作系统版本为：`cat /etc/redhat-release`"
		yum -y install zsh >/var/log/zsh.log
		chsh -s /bin/zsh
		bash install.sh >/var/log/zsh.log
		git clone https://gitee.com/install-zsh/zsh-powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
		git clone https://gitee.com/install-zsh/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
		git clone https://gitee.com/install-zsh/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
		mv zshrc ~/.zshrc
	else
		echo "当前操作系统不是Centos 版本"
		exit
	fi
}

install_zsh
